package com.word.app.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @TableName normWord
 */
@TableName(value ="normWord")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class NormWord implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 
     */
    private String word;

    /**
     * 
     */
    private String meaning;

    /**
     * 
     */
    private Integer cet4;

    /**
     * 
     */
    private Integer cet6;

    /**
     * 
     */
    private Integer ky;

    /**
     * 
     */
    private String sentence;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        NormWord other = (NormWord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getWord() == null ? other.getWord() == null : this.getWord().equals(other.getWord()))
            && (this.getMeaning() == null ? other.getMeaning() == null : this.getMeaning().equals(other.getMeaning()))
            && (this.getCet4() == null ? other.getCet4() == null : this.getCet4().equals(other.getCet4()))
            && (this.getCet6() == null ? other.getCet6() == null : this.getCet6().equals(other.getCet6()))
            && (this.getKy() == null ? other.getKy() == null : this.getKy().equals(other.getKy()))
            && (this.getSentence() == null ? other.getSentence() == null : this.getSentence().equals(other.getSentence()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getWord() == null) ? 0 : getWord().hashCode());
        result = prime * result + ((getMeaning() == null) ? 0 : getMeaning().hashCode());
        result = prime * result + ((getCet4() == null) ? 0 : getCet4().hashCode());
        result = prime * result + ((getCet6() == null) ? 0 : getCet6().hashCode());
        result = prime * result + ((getKy() == null) ? 0 : getKy().hashCode());
        result = prime * result + ((getSentence() == null) ? 0 : getSentence().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", word=").append(word);
        sb.append(", meaning=").append(meaning);
        sb.append(", cet4=").append(cet4);
        sb.append(", cet6=").append(cet6);
        sb.append(", ky=").append(ky);
        sb.append(", sentence=").append(sentence);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}